<?php

namespace App\Http\Requests\user;

use Illuminate\Foundation\Http\FormRequest;

class EditAddressRequest extends FormRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'id' => 'numeric',
            'phone' => 'required|phone',
            'detail' => 'required',
            'is_default' => 'numeric',
            'name' => 'required',
            'p_code' => 'required|numeric',
            'c_code' => 'required|numeric',
            'd_code' => 'numeric',
//            'p_name' => 'required',
//            'c_name' => 'required',
//            'd_name' => 'required'
        ];
    }
}
